package com.vf.admin.utils.pay;

import com.vf.admin.utils.RandomUtil;
import com.vf.admin.utils.pay.ApiAplayWeChat.MD5;

import java.util.Date;

public class ZhiFuUtils {

    public static final String shopid = "1684";
    public static final String shopkey = "65eb6c7b98024321b2b4345020aeb038";
    public static final String callbackurl = "http://pay.qq1997.cn:8081/Pay/GateWay";

    public static ZhiFuUtils getInstance(){
        return new ZhiFuUtils();
    }

    /**
     * 支付类
     */
    public String getZhiFu(String ordernum,double money){
        String message = "parter="+shopid+
                "&type=992" +
                "&value=" + money +
                "&orderid="+ ordernum +
                "&callbackurl=http://www.pmvectq.cn:8083/callbackurl";
        String sign =  MD5.MD5Encode(message+shopkey);

        message = message + "&device=wap&sign=" + sign;
        message = callbackurl+"?"+ message;
        return message;
    }

//    public static void main(String[] args) {
//        Date date = new Date();
//        String code = date.getTime()+ "" ;
//        String message = ZhiFuUtils.getInstance().getZhiFu(code,500.00);
//        System.out.println(message);
//    }


}
